Commit subgraph/abis + subgraph/generated; use rainix-subgraph-test reusable - #2606
Commit subgraph/abis + subgraph/generated; use rainix-subgraph-test reusable#2606thedavidmeister wants to merge 7 commits into
Conversation
…eusable Resolves #2605. - Add script/build-subgraph.sh: copies the 3 ABIs subgraph.yaml needs from out/ to subgraph/abis/, runs npm ci + graph codegen. Picked up by rainix-copy-artifacts.yaml's build-subgraph.sh hook (rainlanguage/rainix#210); the git diff --exit-code gate catches drift. - Commit subgraph/abis/{Raindex,ERC20,DecimalFloat}.json and subgraph/generated/ (un-gitignored). - .prettierignore: skip subgraph/abis/ so the raw forge JSONs match the copy-artifacts regen byte-for-byte. - subgraph.yaml: ../out/*.sol/*.json -> ./abis/*.json. - test-subgraph.yml: thin wrapper over rainix-subgraph-test reusable (matchstick over committed bindings in the slim subgraph-shell, no forge build or graph codegen on the test path). - Bump rainix to 6ffb49299 (post-#210). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
Warning Review limit reached
More reviews will be available in 44 minutes and 16 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (5)
📒 Files selected for processing (19)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
prep-base.sh and pointers.sh now do the same thing post artifact-commit
(forge soldeer install + forge build) — meta is committed (build-meta.sh
hook) and the double forge build in prep-base was only there for the
meta-regen cycle. Collapse onto pointers.sh.
Also fix shellcheck SC2068 (quote ${keep[@]} array expansions) and
SC2034 (drop unused GREEN/NC vars) in the surviving prep-*.sh.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- script/build-subgraph.sh: jq '{abi}' instead of cp — forge's full
artifact JSON (bytecode/metadata/id) embeds build-host paths that
drift across runners and defeat the rainix-copy-artifacts diff gate.
Graph CLI + matchstick only read `.abi`, so stripping costs nothing.
- subgraph/abis/*.json: regenerated against the new strip.
- REUSE.toml: add .prettierignore (file added by an earlier commit on
this branch, missing from the path list, broke rainix-sol / legal).
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
rainlanguage/rainix#212 lands two fixes the consumer side needs: - pkgs.sqlite in rust-build-inputs so rusqlite-using crates compile in slim shells (precondition for the future rainix.yaml refactor). - subgraph-test task does `npm ci` before `docker compose up`, so matchstick finds ./node_modules — unblocks this PR's `subgraph-test` job which is over committed bindings. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
crates/bindings reads ABIs via `sol!` path args (5 contracts: IRaindexV6,
RaindexV6, ERC20, IERC20Metadata, IInterpreterStoreV3). Without committed
ABIs, any rust crate touching these requires `forge build` first — defeats
the slim-shell story.
Commit the 5 ABIs under crates/bindings/abis/ (jq '{abi}' stripped — forge
JSON bytecode/metadata/id embed build-host paths, non-deterministic across
runners; alloy sol! only reads .abi). Point sol! macros at the new location.
Rename script/build-subgraph.sh -> script/build.sh: one generic
post-CopyArtifacts hook, not "build subgraph" / "build bindings" / etc.
build.sh internally `nix develop -c ...` since the renamed rainix hook
(rainix#213) no longer wraps the call.
|
Folded into #2608 — committed bindings/abis + rainix split ship together. |
# Conflicts: # flake.lock
Summary
Resolves #2605. Depends on (merged) rainlanguage/rainix#210.
script/build-subgraph.sh— copies the 3 ABIs thatsubgraph.yamlconsumes (RaindexV6,ERC20,DecimalFloat) fromout/tosubgraph/abis/, then runsnpm ci+graph codegen. Picked up by the newbuild-subgraph.shhook inrainix-copy-artifacts.yaml; the existinggit diff --exit-codegate catches stale committed copies.subgraph/abis/(3 raw forge JSONs) andsubgraph/generated/(graph codegen output). Un-gitignored..prettierignore— skipsubgraph/abis/so the raw forge output matches what the copy-artifacts regen produces, byte-for-byte.subgraph.yaml—../out/*.sol/*.json→./abis/*.json.test-subgraph.yml— thin wrapper overrainix-subgraph-test(matchstick over committed bindings in the slim#subgraph-shell; no forge build or graph codegen on the test path).rainixto6ffb49299(post-List filtering #210).Test plan
copy-artifactsruns the newbuild-subgraph.shhook and the diff stays clean.Subgraph unit testsnow runs in#subgraph-shellover committedsubgraph/abis/+subgraph/generated/. Matchstick still passes.🤖 Generated with Claude Code